package lambda;

import java.util.Arrays;
import java.util.Comparator;

public class demo1 {
    public static void main(String[] args) {
        Integer[] arr = {2, 3, 1, 5, 10, 7, 8};
        //简单理解: o1-o2:升序
        //o2-o1:降序
        Arrays.sort(arr, (Integer o1, Integer o2) -> {
                    return o2 - o1;
                }
        );
        // System.out.println(Arrays.toString(arr));
    }
}
